package com.ylfstu.Homework.homework05;

public class Teacher extends Employee{
    private double classSal;
    private int classDay;

    public Teacher(String name, int age, Double sal, double classSal, int classDay) {
        super(name, age, sal);
        this.classSal = classSal;
        this.classDay = classDay;
    }

    public double getClassSal() {
        return classSal;
    }

    public void setClassSal(double classSal) {
        this.classSal = classSal;
    }

    public int getClassDay() {
        return classDay;
    }

    public void setClassDay(int classDay) {
        this.classDay = classDay;
    }

    @Override
    public void PrintAllYearSal() {
        System.out.println(getName() + "全年工资为" + (getSal() * 12 + classSal * classDay));
    }
}
